Wait For Element Disappears
AutomatR.Web.WaitForElementDisappears
The "Wait For Element Disappears" activity in AutomatR is designed to pause the workflow execution until a specified UI element disappears from the screen. This is particularly useful when waiting for dynamic elements to load or complete actions on a web page.
Properties
Name | Description |
---|---|
Input | |
Element | Indicates the UI element on the web page. Use the "Select" button to choose the element using the selector window. Either this or the "Web Element" property should be provided. |
Web Element | Specifies the UI element variable identified by the "Find Element" or other activities. This variable contains information about the UI element. Either this or the "Element" property should be provided. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before starting the "Wait For Element Disappears" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Timeout | Specifies the maximum time (in seconds) to wait for the specified element to disappear. If the element does not disappear within this time, an exception is thrown. Integer variables containing the timeout duration. Ex.: If the timeout is set to 30 seconds, the value should be 30. If not provided, a default timeout is used. |
Output | |
Result | Outputs the result of the "Wait For Element Disappears" operation, indicating whether the element disappeared within the specified timeout. Variables of relevant types (e.g., Boolean variables) to store the operation result. |
How to use:
- Drag and drop the "Wait For Element Disappears" activity onto the workflow.
- Choose either the "Element" or "Web Element" property to specify the UI element to wait for.
- Optionally, configure the delay and timeout properties.
- Execute the workflow to pause until the specified UI element disappears or the timeout is reached.
Note:
- The activity requires being placed within the context of an "Open Browser" activity.
Example: Consider an example where the "Wait For Element Disappears" activity is used to wait for a loading spinner to disappear on a web page:
Wait For Element Disappears:
Element: [Select UI element using the selector window]
Timeout: 30
Result: isElementDisappeared
In this example, the activity waits for the specified UI element to disappear within a maximum timeout of 30 seconds. The result of the operation (success or failure) is stored in the Boolean variable "isElementDisappeared" for further handling in the workflow.